// FormMainChildDlg12Sub03_07.cpp : implementation file
//

#include "stdafx.h"
#include "diabetes.h"
#include "FormMainChildDlg12Sub03_07.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CFormMainChildDlg12Sub03_07 dialog


CFormMainChildDlg12Sub03_07::CFormMainChildDlg12Sub03_07(CString sz_title,CWnd* pParent /*=NULL*/)
	: CDialog(CFormMainChildDlg12Sub03_07::IDD, pParent)
{
	//{{AFX_DATA_INIT(CFormMainChildDlg12Sub03_07)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	this->m_sz_title = sz_title;
}


void CFormMainChildDlg12Sub03_07::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFormMainChildDlg12Sub03_07)
	DDX_Control(pDX, IDC_TAB_WEB, m_sub_frame_tab);
	DDX_Control(pDX, IDC_STATIC_TITLE, m_title);
	DDX_Control(pDX, IDC_STATIC_18, m_78);
	DDX_Control(pDX, IDC_STATIC_16, m_76);
	DDX_Control(pDX, IDC_STATIC_17, m_77);
	DDX_Control(pDX, IDC_STATIC_14, m_74);
	DDX_Control(pDX, IDC_STATIC_15, m_75);
	DDX_Control(pDX, IDC_STATIC_13, m_73);
	DDX_Control(pDX, IDC_STATIC_12, m_72);
	DDX_Control(pDX, IDC_STATIC_11, m_71);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CFormMainChildDlg12Sub03_07, CDialog)
	//{{AFX_MSG_MAP(CFormMainChildDlg12Sub03_07)
	ON_BN_CLICKED(IDC_STATIC_11, OnStatic71)
	ON_BN_CLICKED(IDC_STATIC_12, OnStatic72)
	ON_BN_CLICKED(IDC_STATIC_13, OnStatic73)
	ON_BN_CLICKED(IDC_STATIC_14, OnStatic74)
	ON_BN_CLICKED(IDC_STATIC_15, OnStatic75)
	ON_BN_CLICKED(IDC_STATIC_16, OnStatic76)
	ON_BN_CLICKED(IDC_STATIC_17, OnStatic77)
	ON_BN_CLICKED(IDC_STATIC_18, OnStatic78)
	ON_WM_LBUTTONDOWN()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFormMainChildDlg12Sub03_07 message handlers

BOOL CFormMainChildDlg12Sub03_07::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	//
	ImageButton_Initial();
	//
	::SetShapeWindowSkin(this->m_hWnd, "IDD_FORM_MAIN_CHILD_DLG12_SUB03_01");
	this->m_title.SetWindowText(this->m_sz_title);
	m_sub_frame_tab.AddPage("m_dlg0701",&m_dlg0701,IDD_FORM_MAIN_CHILD_DLG12_SUB03_07_01);
	m_sub_frame_tab.AddPage("m_dlg0702",&m_dlg0702,IDD_FORM_MAIN_CHILD_DLG12_SUB03_07_02);
	m_sub_frame_tab.AddPage("m_dlg0703",&m_dlg0703,IDD_FORM_MAIN_CHILD_DLG12_SUB03_07_03);
	m_sub_frame_tab.AddPage("m_dlg0704",&m_dlg0704,IDD_FORM_MAIN_CHILD_DLG12_SUB03_07_04);
	m_sub_frame_tab.AddPage("m_dlg0705",&m_dlg0705,IDD_FORM_MAIN_CHILD_DLG12_SUB03_07_05);
	m_sub_frame_tab.AddPage("m_dlg0706",&m_dlg0706,IDD_FORM_MAIN_CHILD_DLG12_SUB03_07_06);
	m_sub_frame_tab.AddPage("m_dlg0707",&m_dlg0707,IDD_FORM_MAIN_CHILD_DLG12_SUB03_07_07);
	m_sub_frame_tab.AddPage("m_dlg0708",&m_dlg0708,IDD_FORM_MAIN_CHILD_DLG12_SUB03_07_08);
	m_sub_frame_tab.Show();
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CFormMainChildDlg12Sub03_07::OnStatic71() 
{
	ImageButton_AllNormal();
	m_71.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(0);
}

void CFormMainChildDlg12Sub03_07::OnStatic72() 
{
	ImageButton_AllNormal();
	m_72.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(1);
}

void CFormMainChildDlg12Sub03_07::OnStatic73() 
{
	ImageButton_AllNormal();
	m_73.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(2);
}

void CFormMainChildDlg12Sub03_07::OnStatic74() 
{
	ImageButton_AllNormal();
	m_74.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(3);
}

void CFormMainChildDlg12Sub03_07::OnStatic75() 
{
	ImageButton_AllNormal();
	m_75.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(4);	
}

void CFormMainChildDlg12Sub03_07::OnStatic76() 
{
	ImageButton_AllNormal();
	m_76.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(5);
}

void CFormMainChildDlg12Sub03_07::OnStatic77() 
{
	ImageButton_AllNormal();
	m_77.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(6);
}

void CFormMainChildDlg12Sub03_07::OnStatic78() 
{
	ImageButton_AllNormal();
	m_78.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(7);
}

void CFormMainChildDlg12Sub03_07::ImageButton_Initial()
{
	m_71.Initial(TRUE,IDB_BITMAP_07_10,IDB_BITMAP_07_11);
	m_72.Initial(FALSE,IDB_BITMAP_07_20,IDB_BITMAP_07_21);
	m_73.Initial(FALSE,IDB_BITMAP_07_30,IDB_BITMAP_07_31);
	m_74.Initial(FALSE,IDB_BITMAP_07_40,IDB_BITMAP_07_41);
	m_75.Initial(FALSE,IDB_BITMAP_07_50,IDB_BITMAP_07_51);
	m_76.Initial(FALSE,IDB_BITMAP_07_60,IDB_BITMAP_07_61);
	m_77.Initial(FALSE,IDB_BITMAP_07_70,IDB_BITMAP_07_71);
	m_78.Initial(FALSE,IDB_BITMAP_07_80,IDB_BITMAP_07_81);
}

void CFormMainChildDlg12Sub03_07::ImageButton_AllNormal()
{
	m_71.SetPressed(FALSE);
	m_72.SetPressed(FALSE);
	m_73.SetPressed(FALSE);
	m_74.SetPressed(FALSE);
	m_75.SetPressed(FALSE);
	m_76.SetPressed(FALSE);
	m_77.SetPressed(FALSE);
	m_78.SetPressed(FALSE);
}

void CFormMainChildDlg12Sub03_07::OnLButtonDown(UINT nFlags, CPoint point) 
{
	CDialog::OnLButtonDown(nFlags, point);
	PostMessage( WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM( point.x, point.y));
}